<?php
class tartalom extends controller{
	public $cim;
	public $tartalom;
	public $menupont;

	public function __construct($url){
		parent::__construct($url);
		$this->cim = null;
		$this->tartalom = null;
		$this->menupont = null;
	}

	public function run(){
		$this->getTartalom();
	}

	private function getTartalom(){
		if(!isset($this->url[1]) || empty($this->url[1])) $this->redirect("error/404/".implode($this->url), "Próba üzenet!");
		$result = $this->database->getTartalom($this->url[1]);
		$this->cim = $result[1];
		$this->tartalom = $result[2];
		$this->menupont = ($result[3]==0) ? $result[0] : $result[3] ;
	}
}
?>